package com.patttern.behavior.strategy;

/**
 * @Author: root
 * @Date: 2018/12/3 22:37
 */
public interface Strategy {
    double getPrice(double price);
}

class PrimaryCustomer implements Strategy {

    @Override
    public double getPrice(double price) {
        return price;
    }
}

class VIPCustomer implements Strategy {

    @Override
    public double getPrice(double price) {
        return price * 0.85;
    }
}

class HighCustomer implements Strategy {

    @Override
    public double getPrice(double price) {
        return price * 0.8;
    }
}